import AuthController from '../controllers/auth_controller'

exports.plugin = {
    name: 'auth-route',
    register: async function(server, options) {
        server.route([
            { path: '/auth/register', method: 'POST', handler: AuthController.emailRegister, config: {auth: false}},
            { path: '/auth/login', method: 'POST', handler: AuthController.login, config: {auth: false}},
            { path: '/auth/email', method: 'GET', handler: AuthController.emailAuth, config: {auth: false}},
            { path: '/auth/test', method: 'POST', handler: AuthController.test, config: {auth: 'jwt'}}
            ])
    }
}
